package com.ruoyi.web.controller.city.domain;


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;

/**
 * 城市对象 cms_city
 *
 * @author ruoyi
 * @date 2020-10-09
 */
public class CmsCity //extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 城市id */
    private Long id;

    private Long parentId;

    /** 城市名称 */
    @Excel(name = "城市名称")
    private String name;
    /** 行政区划 */
    @Excel(name = "行政区划")
    private String adcode;

    /** 首字母 */
    @Excel(name = "首字母")
    private String initial;

    /** 城市拼音 */
    @Excel(name = "城市拼音")
    private String pinyin;
    @Excel(name = "经度")
    private String longitude;
    @Excel(name = "纬度")
    private String latitude;

    /** 是否热门0-否，1-热门 */
    @Excel(name = "是否热门0-否，1-热门")
    private Integer isHot;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createAt;

    /** 是否开启0-开启，1-禁用 */
    private Integer disabled;

    /** 子城市 */
    private List<CmsCity> children = new ArrayList<CmsCity>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public String getAdcode() {
        return adcode;
    }

    public void setAdcode(String adcode) {
        this.adcode = adcode;
    }

    public void setInitial(String initial)
    {
        this.initial = initial;
    }

    public String getInitial()
    {
        return initial;
    }
    public void setPinyin(String pinyin)
    {
        this.pinyin = pinyin;
    }

    public String getPinyin()
    {
        return pinyin;
    }
    public void setIsHot(Integer isHot)
    {
        this.isHot = isHot;
    }

    public Integer getIsHot()
    {
        return isHot;
    }
    public void setCreateAt(Date createAt)
    {
        this.createAt = createAt;
    }

    public Date getCreateAt()
    {
        return createAt;
    }
    public void setDisabled(Integer disabled)
    {
        this.disabled = disabled;
    }

    public Integer getDisabled()
    {
        return disabled;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public List<CmsCity> getChildren() {
        return children;
    }

    public void setChildren(List<CmsCity> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("initial", getInitial())
                .append("pinyin", getPinyin())
                .append("isHot", getIsHot())
                .append("createAt", getCreateAt())
                .append("disabled", getDisabled())
                .toString();
    }
}